
// 常量名
const USER_INFO = 'user_shopping_info'

// 获取存储到本地的用户信息
export const getInfo = () => {
    return JSON.parse(localStorage.getItem(USER_INFO) || '{}') 
 }

// 存储到本地, 持久化
export const setInfo = (result) => { 
    localStorage.setItem(USER_INFO, JSON.stringify(result || {}))
}

// 删除本地存储持久化
export const removeInfo = () => { 
    localStorage.removeItem(USER_INFO)
}